/**
 * Created by Heiliuer on 2018/3/21 0021.
 */
const Koa = require('koa')
const compose = require('koa-compose')
const app = new Koa()

const logger = async (ctx,next) => {
    console.log(`${Date.now()}`);
    next()
}

const main =  async (ctx) => {
    ctx.response.body = 'hello'
}

let middlewares = compose([logger,main])

app.use(middlewares)

app.listen(3000)


